<%@ page session="false" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<html>
	<head>
		<title><fmt:message key="form.title.3"/></title>
    	<link rel="stylesheet" type="text/css"  href="css/common.css" />


	</head>
	<body>
	<body class="ns-0">
        <div id="globalWrapper">
      <div class="bar">&nbsp;</div>
        <div id="content">
		<h1 class="firstHeading"><fmt:message key="form.welcome"/></h1>
        <div id="column-content">
	<div id="bodyContent">
	    <div id="contentSub"></div>
	
		
	    	<div style="border: 1px solid #6eb927; padding: .7em; background-color:#ecf2e6; margin-top: 0;">
			<fmt:message key="form.step3"/>
		</div>
				<div id="errors"><ul></ul></div>
		
		<form method="post">
		
		<table id="main" style="border: 1px solid #aaa; margin: 0; padding: 0; width: 100%;">
			<tr>
				<td style="vertical-align:top; width: 70%; padding-right: .6em;">
					<div class="hp_box">
					<table id="listaAmigos">	
						<tr>
							<td colspan="4"  style="padding: 10pt"><label><fmt:message key="form.conf.mails"/></label></td>
						</tr>
						<tr>
							<td style="font-size: 90%; text-align: center;"><fmt:message key="form.col.id"/></td>
							<td style="font-size: 90%; text-align: center;"><fmt:message key="form.col.name"/></td>
							<td style="font-size: 90%; text-align: center;"><fmt:message key="form.col.mail"/></td>
							<td style="font-size: 90%; text-align: center;"><fmt:message key="form.col.exclude"/></td>
						</tr>
						<%
						for (int i=0; i<((Integer)request.getAttribute("ids")).intValue();i++){
						%>
						  	<tr>
						  		<td><%=i+1%></td>
						  		<td style="text-align: center;"><%=request.getAttribute("name"+i)%></td>
						  		<td style="text-align: center;"><%=request.getAttribute("email"+i)%></td>
						  		<td style="text-align: center;"><%=request.getAttribute("exclude"+i)%></td>
						  	</tr>
						<% } %>
					</table>
				</td>
			</tr>

			<tr>
				<td>
					<table>					
		
						<tr>
							<td colspan="4"  style="padding: 10pt"><label><fmt:message key="form.conf.msg"/></label></td>
						</tr>
		
						<tr>
							<td style="font-size: 90%;"><label><fmt:message key="form.msg.subject"/></label></td>
							<td colspan="3">${amigo.subject}</td>
						</tr>
		
						<tr>
							<td style="font-size: 90%;"><label><fmt:message key="form.msg.body"/></label></td>
							<td colspan="3">${amigo.body}</td>
						</tr>
					</table>
				</td>
			</tr>

			<tr>
				<td>
					<table>					
		
						<tr>
							<td colspan="4"  style="padding: 10pt"><label><fmt:message key="form.instr.captcha"/></label></td>
							<td><a href="faq.html#inst" target="faq"><img src="help.gif"/></a></td>
						</tr>

						<spring:bind path="amigo">
						<c:forEach items="${status.errorMessages}" var="errorMessage">
							<tr>
								<td colspan="4"><font color="#FF0000"><strong>${errorMessage}</strong></font></td>
							</tr>
						</c:forEach>
						</spring:bind>
							
						<tr>
							<td colspan="2"><img src="captcha.htm"/></td>
							<td colspan="2"><input type="text" name="j_captcha_response" /></td> 
						</tr>
						<tr>
							<td colspan="4"><label>&nbsp;</label></td>
						</tr>
						<tr>
							<td colspan="2" align="center"><input type="submit" value="<fmt:message key="form.prev"/>" name="_target1"/></td>
							<td colspan="2" align="center"><input type="submit" value="<fmt:message key="form.submit"/>" name="_finish"/></td>
						</tr>							
					</table>
			</div>
				</td>
			</tr>	
		</table>
			
		</form>		
		<%@ include file="footer.jsp" %>
		
			</div>
			</div>
			</div>
			</div>

	</body>
</html>